
<nav class="navbar is-primary" >
    <div class="container">
        <div class="navbar-brand">
            <a href="{{ site.baseurl }}/" class="navbar-item">
                Jason
            </a>
            <a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="navMenu">
                <span aria-hidden="true"></span>
                <span aria-hidden="true"></span>
                <span aria-hidden="true"></span>
            </a>
        </div>
        <div class="navbar-menu" id="navMenu">
            <div class="navbar-start">
                <a href="{{ site.baseurl }}/" class="navbar-item {% if page.url == "/" %}is-active{% endif %}">主页</a>
                {% if site.data.navigation %}
                {% for item in site.data.navigation %}
                    {% if item.dropdown %}
                    <div class="navbar-item has-dropdown is-hoverable">
                        <a href="{{ item.link | prepend: site.baseurl }}" class="navbar-link {% if item.link == page.url %}is-active{% endif %}">{{ item.name }}</a>
                        <div class="navbar-dropdown">
                            {% for subitem in item.dropdown %}
                            <a href="{{ subitem.link | prepend: site.baseurl }}" class="navbar-item {% if subitem.link == page.url %}is-active{% endif %}">{{ subitem.name }}</a>
                            {% endfor %}
                        </div>
                    </div>
                    {% else %}
                    <a href="{{ item.link | prepend: site.baseurl }}" class="navbar-item {% if item.link == page.url %}is-active{% endif %}">{{ item.name }}</a>
                    {% endif %}
                {% endfor %}
                {% endif %}
            </div>
        </div>
    </div>
</nav>
